﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace ExtensionMethods
{
    class ExtensionMethods<T> where T : IComparable 
    {
        public static T Min(this IEnumerable<T> elements) 
        {
            T min = elements.First();
            foreach(var element in elements)
            {
                if (element.CompareTo(min) <0)
                    min = element;
            }
            return min;
        }
    }
}
